<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">
        <span class="font-bold" translate="aside.nav.process.filter"
              ng-if="isFilter = '/filter' === $state.current.url"></span>
    </h1>
</div>

<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper">
    <div class="panel panel-default">
        <div ng-controller="PatientIndexCtrl">
            <table class="table table-striped m-b-none" style="width:100%" dt-disable-deep-watchers="true" ui-options="dtOptions" ui-jq="dataTable">
                <thead>
                    <tr>
                        <th ng-class="isSmart?'col-xs-4':''" translate="business.servreq.id"></th>
                        <th translate="common.updated" ng-if="!isSmart"></th>
                        <th translate="common.name"></th>
                        <th translate="user.gender" ng-if="!isSmart"></th>
                        <th translate="business.servreq.serviceType" ng-if="!isSmart"></th>
                        <th translate="common.status" ng-if="!isSmart"></th>
                        <th translate="common.operate"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="model in patients">
                        <td>S-{{ model.servReq_Id }}</td>
                        <td ng-if="!isSmart">{{ moment(model.updated).format("YYYY-MM-DD") }}</td>
                        <td>{{ model._patCase._patient._user.realName }}</td>
                        <td ng-if="!isSmart">
                            <span ng-show="model._patCase._patient._user.gender != null">
                            {{ 'user.gender.' + model._patCase._patient._user.gender  | translate}}
                            </span>
                        </td>
                        <td ng-if="!isSmart">{{ 'servicetype.servicetype_' + model._servType.service_Id | translate }}</td>
                        <td ng-if="!isSmart">{{ 'status.' + model.status | translate }}</td>
                        <td>
                            <span ng-if="isFilter">
                                 <button type="button" class="btn btn-sm btn-info font-bold" title="{{ 'business.patcase.select' | translate }}"
                                         ng-click="open({ templateUrl: 'views/work/basic_patient_selection.html?a=1' }, model)"
                                         ng-if="model.canSetNeedDiag || model.canSetNeedSolution">
                                     <em class="fa fa-filter"></em>
                                     &nbsp;<span translate="business.patcase.select"></span>
                                 </button>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div ng-include="'views/work/templates.html'"></div>